//
//  XMMineSettingLine.m
//  XunMi
//
//  Created by MacBook on 2024/2/29.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMMineSettingLine.h"

@implementation XMMineSettingLine

- (void)setShowSwitch:(BOOL)showSwitch {
    _showSwitch = showSwitch;
    
    self.mySwitch.hidden = !showSwitch;
    self.arrow.hidden = showSwitch;
    self.descLa.hidden = showSwitch;
    self.actBtn.hidden = showSwitch;
}

- (IBAction)clickBlock:(UIButton *)sender {
    if (self.clickBlock) {
        self.clickBlock();
    }
}

- (IBAction)switchAct:(UISwitch *)sender {
    if (self.switchBlock) {
        self.switchBlock(sender.isOn);
    }
}

@end
